package com.sky.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 分类 新增分类 接收数据 dto
 */
@Data
@ApiModel(value = "CategoryDTO", description = "新增分类传递数据的模型")
public class CategoryDTO implements Serializable {

    //主键
    @ApiModelProperty("主键值")
    private Long id;

    //类型 1 菜品分类 2 套餐分类
    @ApiModelProperty(value = "类型 1 菜品分类 2 套餐分类", required = true)
    @NotNull(message = "分类类型为空")
    private Integer type;

    //分类名称
    @NotBlank(message = "分类名称为空")
    @ApiModelProperty(value = "分类名称", required = true)
    private String name;

    //排序
    @NotNull(message = "排序字段为空")
    @ApiModelProperty(value = "排序", required = true)
    private Integer sort;


}
